package com.lxc.graduation.controller;

import com.lxc.graduation.entity.domain.ResourceDo;

import com.lxc.graduation.service.ResourceService;
import com.lxc.graduation.utils.JsonData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: ck
 * @Description:
 * @Date: Create in 22:01 2021/1/29
 */
@RestController
@RequestMapping("/api/pub/v1/resource")
public class ResourceController {
    @Autowired
    private ResourceService resourceService;

    @RequestMapping("findAll")
    public JsonData findAll()
    {
        List<ResourceDo> resourceDoList =resourceService.findAll();
        return JsonData.buildSuccess(resourceDoList);
    }

}
